package com.kmxd.ams.client.archive.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 知悉范围
 *
 * @author nickbi
 * @since 2024-01-08
 */
@Data
@Schema(description = "知悉范围对象")
public class ArchiveAuthVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  @JsonSerialize(using = ToStringSerializer.class)
  private Long fondsId;

  @JsonSerialize(using = ToStringSerializer.class)
  private Long comId;

  @Schema(description = "按单位过滤")
  private Boolean authDepartment;

  @Schema(description = "按创建人过滤")
  private Boolean authUser;

  @Schema(description = "门类id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long archTypeId;

  @Schema(description = "类型:1知悉范围内,2知悉范围外,3外单位")
  private Integer scopeType;

  @Schema(description = "在线浏览，有权限为1，没有权限为0")
  private Boolean onlineBrowser;

  /** 在线浏览，有权限为1，没有权限为0 */
  @Schema(description = "原文浏览，有权限为1，没有权限为0")
  private Boolean browserFile;

  @Schema(description = "在线打印，有权限为1，没有权限为0")
  private Boolean onlinePrint;

  @Schema(description = "下载，有权限为1，没有权限为0")
  private Boolean download;

  @Schema(description = "下载源文件，有权限为1，没有权限为0")
  private Boolean downloadSource;

  @Schema(description = "现场借阅，有权限为1，没有权限为0")
  private Boolean liveRead;

  @Schema(description = "外借，有权限为1，没有权限为0")
  private Boolean lendOut;

  @Schema(description = "复制外发，有权限为1，没有权限为0")
  private Boolean copySend;

  @Schema(description = "摘录，有权限为1，没有权限为0")
  private Boolean excerpt;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;

  @Schema(description = "删除状态(0-正常,1-已删除)")
  private Boolean delFlag;
}
